#ifndef LIBRARY_H_
#define LIBRARY_H_

#include "piece.h"
#include "include.h"

class Library
{
private:
	 QList<Piece> pieces_collection;
	 QString library_path;
	 QString name;
	
public:
	Library(QString);
	Library();
	virtual ~Library();
	
	QList<Piece> getPiecesCollection();
	Piece getPieceAt(int);
	void addPiece(Piece);
	void addPieces(QList<Piece>);
	void insertPiece(int, Piece);
	void removePiece(Piece);
	void removePieceAt(int);
	void removePieces();
	void replacePiece(int, Piece);
	void saveLibrary();
	void saveLibraryAs(QString);
	void setPath(QString);
	void setName(QString);
	bool loadLibrary(QString);
	int count();
	QString getPath();
	QString getName();
	
	
	static void LoadPiecesList(QString , QListWidget *);
	static void LoadLibraryList(QString , QListWidget *);
	static void LoadLibraryList(QString , QComboBox *);
};

#endif /*LIBRARY_H_*/
